package it.desertsupport.model;

public class Profile {
	
	private Long idProfile;
	private String name;
	private String surname;
	private String email;
	
	// Constructors
	public Profile() {}

	public Profile(String name, String surname, String email) {
		super();
		this.name = name;
		this.surname = surname;
		this.email = email;
	}

	public Profile(Long idProfile, String name, String surname, String email) {
		this.idProfile = idProfile;
		this.name = name;
		this.surname = surname;
		this.email = email;
	}

	// Getter and Setter
	public Long getIdProfile() {
		return this.idProfile;
	}
	public void setIdProfile(Long idProfile) {
		this.idProfile = idProfile;
	}

	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String getSurname() {
		return this.surname;
	}
	public void setSurname(String surname) {
		this.surname = surname;
	}

	public String getEmail() {
		return this.email;
	}
	public void setEmail(String email) {
		this.email = email;
	}

	// Methods
	@Override
	public String toString() {
		return "Profile [idProfile=" + idProfile + ", name=" + name
				+ ", surname=" + surname + ", email=" + email + "]";
	}

	@Override
	public boolean equals(Object object) {
		if(object == null || !(object instanceof Profile)){
			return false;
		}
		Profile profile = (Profile) object;
		return profile.getIdProfile() == this.idProfile;
	}

}
